<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>一般工程抗震设防审查情况</title>
    <script src="../../js/header.js"></script>
    <style type="text/css">
        html, body, #app {
            padding: 0px;
            margin: 0px;
        }

        #app {
            border-top: 3px solid #0D9AFF;
            background: #FFFFFF;
            box-shadow: 0px 2px 4px 0 rgba(200, 200, 200, 0.50);
            padding: 25px;
            background: url(../../images/bg.png) no-repeat;
            background-size: cover;
            /*background-attachment: fixed;*/
        }

        .tab-title {
            font-size: 16px;
            font-weight: bold;
            border-left: 4px solid #0D9AFF;
            font-family: PingFangSC-Medium;
            padding-left: 10px;
            margin-bottom: 20px;
        }

        .pagination {
            text-align: center;
            margin-top: 30px;
        }

        .el-dialog__footer {
            padding: 10px 20px 20px;
            text-align: center;
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
        }

        .el-dialog__body {
            color: rgb(96, 98, 102);
            font-size: 14px;
            word-break: break-all;
            padding: 0px 20px;
        }

        .el-input__inner {
            -webkit-appearance: none;
            background-color: #FFF;
            background-image: none;
            border-radius: 4px;
            border: 1px solid #DCDFE6;
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
            color: #606266;
            display: inline-block;
            font-size: inherit;
            height: 30px;
            line-height: 30px;
            outline: 0;
            padding: 0 15px;
            -webkit-transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
            transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
            width: 100%;
        }
    </style>
</head>

<body>
<div v-cloak id="app">
    <!--待办-->
    <!--审定弹窗-->
    <div v-if="linkStatus=='1'">
        <el-form :model="checkcommonproject" :rules="rules" ref="checkcommonproject" label-width="140px">
            <!--建设工程情况-->
            <el-row>
                <el-col :span="4" class="tab-title">
                    建设工程情况
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="18">
                    <el-form-item label="项目名称:" prop="proName" label-width="110px">
                        <el-input v-model="checkcommonproject.proName" placeholder="" disabled></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="18">
                    <el-form-item label="项目场址:" required label-width="110px">
						<span v-for="(item,index) in checkcommonproject.address">
							<el-col :span="4">
								<el-form-item :prop="'address.'+index+'.provinceValue'" :rules="rules.provinceValue">
									<el-select v-model="item.provinceValue" placeholder="请选择省" @change="chooseProvince(item)" style="" disabled>
										<el-option	
								    		v-for="items in item.provinceData"
								    		:key="items.code"
								    		:label="items.name"
								    		:value="items.name">
										</el-option>
									</el-select>
								</el-form-item>
							</el-col>
							<el-col span="0.5" style="color: rgb(192, 204, 218);text-align: center;">
                                <span>—</span>
                            </el-col>
							<el-col :span="4">						
								<el-form-item :prop="'address.'+index+'.cityValue'" :rules="rules.cityValue">
									<el-select v-model="item.cityValue" placeholder="请选择市" @change="chooseCity(item)" style="" disabled>
										<el-option	
								    		v-for="items in item.cityData"
								    		:key="items.code"
								    		:label="items.name"
								    		:value="items.name">
										</el-option>
									</el-select>
								</el-form-item>
							</el-col>
							<el-col span="0.5" style="color: rgb(192, 204, 218);text-align: center;">
                                <span>—</span>
                            </el-col>
							<el-col :span="4">
								<el-form-item :prop="'address.'+index+'.areaValue'" :rules="rules.areaValue">									
									<el-select v-model="item.areaValue" placeholder="请选择区、县" @change="chooseArea(item)" style="" disabled>
								    	<el-option
									        v-for="items in item.areaData"
									        :key="items.code"
									        :label="items.name"
									        :value="items.name">
									    </el-option>
								    </el-select>
							    </el-form-item>
						    </el-col>
						    <el-col span="0.5" style="color: rgb(192, 204, 218);text-align: center;">
                                <span>—</span>
                            </el-col>
						    <el-col :span="9">
							    <el-form-item>
							    	<el-input v-model="item.detailAddress" placeholder="填写详细地址" disabled></el-input>
							    </el-form-item>
						    </el-col>
						    <el-button v-if="index=='0'" size="mini" @click="addAddress()" icon="el-icon-circle-plus-outline" icon="el-icon-circle-plus-outline" style="margin-left: 8px;" disabled>跨省</el-button>
						    <el-button v-if="index!='0'" size="mini" @click="delAddress(index,item)" icon="el-icon-delete" style="margin-left: 8px;" disabled>删除</el-button>
						</span>	
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="24">
                    <el-form-item label="建设内容:" prop="proContent" label-width="110px" :required="reRemarkRequired">
                        <el-input
                                disabled
                                type="textarea"
                                :autosize="{ minRows: 8, maxRows: 8}"
                                placeholder="请输入建设内容"
                                v-model="checkcommonproject.proContent">
                        </el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <!--建设单位信息-->
            <el-row>
                <el-col :span="4" class="tab-title">
                    建设单位信息
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="12">
                    <el-form-item label="单位名称:" prop="unitName" label-width="90px">
                        <el-input v-model="checkcommonproject.unitName" placeholder="" disabled></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="6">
                    <el-form-item label="联系人:" prop="unitUser" label-width="110px">
                        <el-input v-model="checkcommonproject.unitUser" placeholder="" disabled></el-input>
                    </el-form-item>
                </el-col>
                <el-col span="5">
                    <el-form-item label="电话" prop="unitPhone" label-width="110px">
                        <el-input v-model="checkcommonproject.unitPhone" placeholder="" disabled></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="18">
                    <el-form-item label="营业执照号码或三证合一证照号码:" prop="unitCode" label-width="240px">
                        <el-input v-model="checkcommonproject.unitCode" placeholder="" disabled></el-input>
                        </el-date-picker>
                    </el-form-item>
                </el-col>
                <el-col :span="5">
                    <el-form-item label="法人:" prop="unitLegal" label-width="110px">
                        <el-input v-model="checkcommonproject.unitLegal" placeholder="" disabled></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <!--一般工程抗震设防情况-->
            <el-row>
                <el-col :span="4" class="tab-title">
                    一般工程抗震设防情况
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="12">
                    <el-form-item label="抗震设防依据:" prop="earthquakeBasis" label-width="120px">
                        <el-select v-model="checkcommonproject.earthquakeBasis" placeholder="请选择抗震设防依据" style="width : 80%;" disabled>
                            <el-option label="区划图" value="1"></el-option>
                            <el-option label="小区划" value="2"></el-option>
                            <el-option label="区域安全性评估" value="3"></el-option>
                            <el-option label="其他" value="4"></el-option>
                        </el-select>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="行业性质:" prop="industry" label-width="110px">
                        <el-select v-model="checkcommonproject.industry" placeholder="请选择行业性质" style="width : 80%;" disabled>
                            <el-option label="城镇给排水、燃气、热力建筑" value="城镇给排水、燃气、热力建筑"></el-option>
                            <el-option label="电力建筑" value="电力建筑"></el-option>
                            <el-option label="交通运输建筑" value="交通运输建筑"></el-option>
                            <el-option label="邮电通信、广播电视建筑" value="邮电通信、广播电视建筑"></el-option>
                            <el-option label="公共建筑" value="公共建筑"></el-option>
                            <el-option label="居住建筑" value="居住建筑"></el-option>
                            <el-option label="工业建筑" value="工业建筑"></el-option>
                            <el-option label="仓库类建筑" value="仓库类建筑"></el-option>
                        </el-select>
                    </el-form-item>
                </el-col>
            </el-row>
            <!--附件-->
            <el-row>
                <el-col :span="24">
                    <el-form-item label="附件:" prop="" label-width="110px">
                        <iframe id="checkFrame" style="overflow:hidden;height:200px;width:100%;" width="100%"
                                frameBorder="0"
                                :src="link"></iframe>
                    </el-form-item>
                </el-col>
            </el-row>
            <!--项目填报信息-->
            <el-row>
                <el-col :span="4" class="tab-title">
                    项目信息
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="6">
                    <el-form-item label="填报日期:" prop="reCreateTime" label-width="110px">
                        <el-date-picker
                                disabled
                                v-model="checkcommonproject.reCreateTime"
                                type="date"
                                placeholder="选择填报日期">
                        </el-date-picker>
                    </el-form-item>
                </el-col>
                <el-col :span="6">
                    <el-form-item label="填报人员:" prop="reCreateUser" label-width="110px">
                        <el-input v-model="checkcommonproject.reCreateUser" placeholder="请输入填报人员"
                                  disabled></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="6">
                    <el-form-item label="填报部门:" prop="reCreateDepartment" label-width="110px">
                        <el-input v-model="checkcommonproject.reCreateDepartment" placeholder="请输入填报部门"
                                  disabled></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="24">
                    <el-form-item label="备注:" prop="reRemark" label-width="110px">
                        <el-input
                                disabled
                                type="textarea"
                                :autosize="{ minRows: 8, maxRows: 8}"
                                placeholder=""
                                v-model="checkcommonproject.reRemark">
                        </el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <!--审定信息-->
            <el-row>
                <el-col :span="4" class="tab-title">
                    审定信息
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="6">
                    <el-form-item label="审定人员:" prop="checkUser" label-width="110px">
                        <el-input v-model="checkcommonproject.checkUser" placeholder=""></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="6">
                    <el-form-item label="审定人员机构:" prop="checkOrg">
                        <el-input v-model="checkcommonproject.checkOrg" placeholder=""></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="6">
                    <el-form-item label="审定结果:" prop="checkResult" label-width="110px">
                        <el-select v-model="checkcommonproject.checkResult" placeholder="请选择">
                            <el-option label="同意" value="1"></el-option>
                            <el-option label="不同意" value="0"></el-option>
                        </el-select>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="24">
                    <el-form-item label="审定意见:" prop="checkView" label-width="110px">
                        <el-input
                                type="textarea"
                                :autosize="{ minRows: 8, maxRows: 8}"
                                placeholder="请输入内容"
                                v-model="checkcommonproject.checkView">
                        </el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="22">
                    <div style="float:right;">
                        <el-button type="primary" size="small" style="width: 60px;height: 30px;"
                                   @click="checkonSubmit('checkcommonproject')">审定
                        </el-button>
                        <el-button type="info" size="small" style="width: 60px;height: 30px;"
                                   @click="resetForm('checkcommonproject');checkCancel()">取消
                        </el-button>
                    </div>
                </el-col>
            </el-row>
        </el-form>
    </div>
    <!--已办-->
    <!--查看弹窗-->
    <div v-if="linkStatus=='2'||linkStatus=='3'">
        <div style="margin-top: 10px;">
            <el-form :model="viewcommonproject" :rules="rules" ref="viewcommonproject" label-width="140px">
                <!--建设工程情况-->
                <el-row>
                    <el-col :span="4" class="tab-title">
                        建设工程情况
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="18">
                        <el-form-item label="项目名称:" prop="proName" label-width="110px">
                            <el-input v-model="viewcommonproject.proName" placeholder="" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="18">
                        <el-form-item label="项目场址:" required label-width="110px">
							<span v-for="(item,index) in viewcommonproject.address">
								<el-col :span="4">
									<el-form-item :prop="'address.'+index+'.provinceValue'" :rules="rules.provinceValue">
										<el-select v-model="item.provinceValue" placeholder="请选择省" @change="chooseProvince(item)" style="" disabled>
											<el-option	
									    		v-for="items in item.provinceData"
									    		:key="items.code"
									    		:label="items.name"
									    		:value="items.name">
											</el-option>
										</el-select>
									</el-form-item>
								</el-col>
								<el-col span="0.5" style="color: rgb(192, 204, 218);text-align: center;">
	                                <span>—</span>
	                            </el-col>
								<el-col :span="4">						
									<el-form-item :prop="'address.'+index+'.cityValue'" :rules="rules.cityValue">
										<el-select v-model="item.cityValue" placeholder="请选择市" @change="chooseCity(item)" style="" disabled>
											<el-option	
									    		v-for="items in item.cityData"
									    		:key="items.code"
									    		:label="items.name"
									    		:value="items.name">
											</el-option>
										</el-select>
									</el-form-item>
								</el-col>
								<el-col span="0.5" style="color: rgb(192, 204, 218);text-align: center;">
	                                <span>—</span>
	                            </el-col>
								<el-col :span="4">
									<el-form-item :prop="'address.'+index+'.areaValue'" :rules="rules.areaValue">									
										<el-select v-model="item.areaValue" placeholder="请选择区、县" @change="chooseArea(item)" style="" disabled>
									    	<el-option
										        v-for="items in item.areaData"
										        :key="items.code"
										        :label="items.name"
										        :value="items.name">
										    </el-option>
									    </el-select>
								    </el-form-item>
							    </el-col>
							    <el-col span="0.5" style="color: rgb(192, 204, 218);text-align: center;">
	                                <span>—</span>
	                            </el-col>
							    <el-col :span="9">
								    <el-form-item>
								    	<el-input v-model="item.detailAddress" placeholder="填写详细地址" disabled></el-input>
								    </el-form-item>
							    </el-col>
							    <el-button v-if="index=='0'" size="mini" @click="addAddress()" icon="el-icon-circle-plus-outline" icon="el-icon-circle-plus-outline" style="margin-left: 8px;" disabled>跨省</el-button>
							    <el-button v-if="index!='0'" size="mini" @click="delAddress(index,item)" icon="el-icon-delete" style="margin-left: 8px;" disabled>删除</el-button>
							</span>	
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="建设内容:" prop="proContent" label-width="110px" :required="reRemarkRequired">
                            <el-input
                                    disabled
                                    type="textarea"
                                    :autosize="{ minRows: 8, maxRows: 8}"
                                    placeholder="请输入建设内容"
                                    v-model="viewcommonproject.proContent">
                            </el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <!--建设单位信息-->
                <el-row>
                    <el-col :span="4" class="tab-title">
                        建设单位信息
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="12">
                        <el-form-item label="单位名称:" prop="unitName" label-width="90px">
                            <el-input v-model="viewcommonproject.unitName" placeholder="" disabled></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6">
                        <el-form-item label="联系人:" prop="unitUser" label-width="110px">
                            <el-input v-model="viewcommonproject.unitUser" placeholder="" disabled></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col span="5">
                        <el-form-item label="电话" prop="unitPhone" label-width="110px">
                            <el-input v-model="viewcommonproject.unitPhone" placeholder="" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="18">
                        <el-form-item label="营业执照号码或三证合一证照号码:" prop="unitCode" label-width="240px">
                            <el-input v-model="viewcommonproject.unitCode" placeholder="" disabled></el-input>
                            </el-date-picker>
                        </el-form-item>
                    </el-col>
                    <el-col :span="5">
                        <el-form-item label="法人:" prop="unitLegal" label-width="110px">
                            <el-input v-model="viewcommonproject.unitLegal" placeholder="" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <!--一般工程抗震设防情况-->
                <el-row>
                    <el-col :span="4" class="tab-title">
                        一般工程抗震设防情况
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="12">
                        <el-form-item label="抗震设防依据:" prop="earthquakeBasis" label-width="120px">
                            <el-select v-model="viewcommonproject.earthquakeBasis" placeholder="请选择抗震设防依据" style="width : 80%;" disabled>
                                <el-option label="区划图" value="1"></el-option>
                                <el-option label="小区划" value="2"></el-option>
                                <el-option label="区域安全性评估" value="3"></el-option>
                                <el-option label="其他" value="4"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="行业性质:" prop="industry" label-width="110px">
                            <el-select v-model="viewcommonproject.industry" placeholder="请选择行业性质" style="width : 80%;" disabled>
                                <el-option label="城镇给排水、燃气、热力建筑" value="城镇给排水、燃气、热力建筑"></el-option>
                                <el-option label="电力建筑" value="电力建筑"></el-option>
                                <el-option label="交通运输建筑" value="交通运输建筑"></el-option>
                                <el-option label="邮电通信、广播电视建筑" value="邮电通信、广播电视建筑"></el-option>
                                <el-option label="公共建筑" value="公共建筑"></el-option>
                                <el-option label="居住建筑" value="居住建筑"></el-option>
                                <el-option label="工业建筑" value="工业建筑"></el-option>
                                <el-option label="仓库类建筑" value="仓库类建筑"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>
                <!--附件-->
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="附件:" prop="" label-width="110px">
                            <iframe id="viewFrame" style="overflow:hidden;height:200px;width:100%;" width="100%"
                                    frameBorder="0"
                                    :src="link"></iframe>
                        </el-form-item>
                    </el-col>
                </el-row>
                <!--项目填报信息-->
                <el-row>
                    <el-col :span="4" class="tab-title">
                        项目信息
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="6">
                        <el-form-item label="填报日期:" prop="reCreateTime" label-width="110px">
                            <el-date-picker
                                    disabled
                                    v-model="viewcommonproject.reCreateTime"
                                    type="date"
                                    placeholder="选择填报日期">
                            </el-date-picker>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6">
                        <el-form-item label="填报人员:" prop="reCreateUser" label-width="110px">
                            <el-input v-model="viewcommonproject.reCreateUser" placeholder="请输入填报人员"
                                      disabled></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6">
                        <el-form-item label="填报部门:" prop="reCreateDepartment" label-width="110px">
                            <el-input v-model="viewcommonproject.reCreateDepartment" placeholder="请输入填报部门"
                                      disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="备注:" prop="reRemark" label-width="110px">
                            <el-input
                                    disabled
                                    type="textarea"
                                    :autosize="{ minRows: 8, maxRows: 8}"
                                    placeholder=""
                                    v-model="viewcommonproject.reRemark">
                            </el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <!--审定信息：审定状态为2：审定未过 、3：审定通过 时展示审定信息-->
                <div v-if="viewcommonproject.checkStatus==2 || viewcommonproject.checkStatus==3">
                    <el-row>
                        <el-col :span="4" class="tab-title">
                            审定信息
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="6">
                            <el-form-item label="审定人员:" prop="checkUser" label-width="110px">
                                <el-input v-model="viewcommonproject.checkUser" placeholder="" disabled></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6">
                            <el-form-item label="审定人员机构:" prop="checkOrg">
                                <el-input v-model="viewcommonproject.checkOrg" placeholder="" disabled></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6">
                            <el-form-item label="审定结果:" prop="checkResult" label-width="110px">
                                <el-select v-model="viewcommonproject.checkResult" placeholder="请选择" disabled>
                                    <el-option label="同意" value="1"></el-option>
                                    <el-option label="不同意" value="0"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="24">
                            <el-form-item label="审定意见:" prop="checkView" label-width="110px">
                                <el-input
                                        disabled
                                        type="textarea"
                                        :autosize="{ minRows: 8, maxRows: 8}"
                                        placeholder="请输入内容"
                                        v-model="viewcommonproject.checkView">
                                </el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                </div>
                <!--关闭-->
                <el-row>
                    <el-col :span="22">
                        <div style="float:right;">
                            <el-button type="info" size="small" style="width: 60px;height: 30px;"
                                       @click="viewCancel()">关闭
                            </el-button>
                        </div>
                    </el-col>
                </el-row>
            </el-form>
        </div>
    </div>
</div>
<script>
    var vm = new Vue({
        el: '#app',
        data() {
            return {
                uuid: '',// uuid
                link: '', // 附件iframe
                linkId: '', //项目ID
                linkStatus: '', //状态码
                // 用户登录信息
                userName: '', // 用户登录名称
                orgName: '', // 组织名称对应项目地址
                orgLevel: '', // 组织等级对应 地市级、省级、中国级地震局用户
                viewcommonproject: {
                    proName: '',
                    address:[{
	                	provinceValue:'',
		                cityValue:'',
		                areaValue:'',
		                detailAddress:'',
	                	provinceData:[],
	                	cityData:[],
	                	areaData:[]
	                }],
                    proAddress: '',
                    proContent: '',
                    unitName: '',
                    unitUser: '',
                    unitPhone: '',
                    unitCode: '',
                    unitLegal: '',
                    earthquakeBasis: '',
                    reCreateTime: '',
                    reCreateUser: '',
                    reCreateDepartment: '',
                    reRemark: '',
                    checkUser: '',
                    checkOrg: '',
                    checkResult: '',
                    checkView: '',
                    checkStatus: '',
                    industry : '' // 行业性质
                },
                checkcommonproject: {
                    proName: '',
                    address:[{
	                	provinceValue:'',
		                cityValue:'',
		                areaValue:'',
		                detailAddress:'',
	                	provinceData:[],
	                	cityData:[],
	                	areaData:[]
	                }],
                    proAddress: '',
                    proContent: '',
                    unitName: '',
                    unitUser: '',
                    unitPhone: '',
                    unitCode: '',
                    unitLegal: '',
                    earthquakeBasis: '',
                    reCreateTime: '',
                    reCreateUser: '',
                    reCreateDepartment: '',
                    reRemark: '',
                    checkUser: '',
                    checkOrg: '',
                    checkResult: '',
                    checkView: '',
                    checkStatus: '',
                    industry : '' // 行业性质
                },
                rules: {
                    proName: [{
                        required: true,
                        message: '请输入项目名称',
                        trigger: 'blur'
                    }],
                    provinceValue: [{
                        required: true,
                        message: '请选择省',
                        trigger: 'change'
                    }],
                    cityValue: [{
                        required: true,
                        message: '请选择市',
                        trigger: 'change'
                    }],
                    areaValue: [{
                        required: true,
                        message: '请选择区、县',
                        trigger: 'change'
                    }],           
                    proAddress: [{
                        required: true,
                        message: '请输入项目地址',
                        trigger: 'blur'
                    }],
                    proContent: [{
                        required: true,
                        message: '请输入建设内容',
                        trigger: 'blur'
                    }],
                    unitName: [{
                        required: true,
                        message: '请输入单位名称',
                        trigger: 'blur'
                    }],
                    unitUser: [{
                        required: true,
                        message: '请输入联系人',
                        trigger: 'blur'
                    }],
                    unitPhone: [{
                        required: true,
                        message: '请输入电话',
                        trigger: 'blur'
                    }],
                    unitCode: [{
                        required: true,
                        message: '请输入营业执照号码或三证合一证照号码',
                        trigger: 'blur'
                    }],
                    unitLegal: [{
                        required: true,
                        message: '请输入法人',
                        trigger: 'blur'
                    }],
                    earthquakeBasis: [{
                        required: true,
                        message: '请输入抗震设防依据',
                        trigger: 'blur'
                    }],
                    industry: [{
                        required: true,
                        message: '请选择行业性质',
                        trigger: 'blur'
                    }],
                    /* fujian: [{
                         required: true,
                         message: '请输入附件',
                         trigger: 'blur'
                     }],*/
                    reCreateTime: [{
                        required: true,
                        message: '请输入填报日期',
                        trigger: 'blur'
                    }],
                    reCreateUser: [{
                        required: true,
                        message: '请输入填报人员',
                        trigger: 'blur'
                    }],
                    reCreateDepartment: [{
                        required: true,
                        message: '请输入填报部门',
                        trigger: 'blur'
                    }],
                    reRemark: [{
                        required: false,
                        message: '请输入备注',
                        trigger: 'blur'
                    }],
                    checkUser: [{
                        required: true,
                        message: '请输入审定人员',
                        trigger: 'blur'
                    }],
                    checkOrg: [{
                        required: true,
                        message: '请输入审定人员机构',
                        trigger: 'blur'
                    }],
                    checkResult: [{
                        required: true,
                        message: '请输入审定结果',
                        trigger: 'blur'
                    }],
                    checkView: [{
                        required: true,
                        message: '请输入审定意见',
                        trigger: 'blur'
                    }],
                    checkStatus: [{
                        required: true,
                        message: '请输入审定结果',
                        trigger: 'blur'
                    }]
                },
            }
        },
        created() {
            // 获取登录用户信息
            var userInfo = JSON.parse(localStorage.getItem('userInfo'));
            this.orgLevel = userInfo.orgLevel;
            // 中国地震局 ==> 中国, 山东省-济南市地震局 ==> 山东省-济南市
            this.orgName = userInfo.orgName.replace("地震局", "");
            this.userName = userInfo.loginName;
            console.log("用户名：" + this.userName);
            console.log("组织等级：" + this.orgLevel);
            console.log("组织名称：" + this.orgName);
        },
        mounted() {
            console.log(window.location.href);
            var url = window.location.href;
            this.linkId = url.split("?")[1].split("=")[1];
            console.log(this.linkId)
            this.uuid = this.linkId;
            this.link = "../upload/annex.html?uuid=" + this.uuid + "&flag=0";
            this.getData();
        },
        methods: {
            // 加载数据
            getData() {
                axios({
                    method: 'get',
                    url: '/dzjap/generecord/getInfo',
                    params: {
                        Id: this.linkId
                    }
                }).then(response => {
                        console.log(response);
                        console.log(response.data);
                        if (response.data.code == 200) {
                            this.viewcommonproject = response.data.data;
                            this.checkcommonproject = response.data.data;
                            var arr1 = this.viewcommonproject.proAddress.split(",");
			                this.viewcommonproject.address=[];                
			                for(let i=0;i<arr1.length;i++){
			                	this.viewcommonproject.address.push({
			                		provinceValue:arr1[i].split("-")[0],
					                cityValue:arr1[i].split("-")[1],
					                areaValue:arr1[i].split("-")[2],
					                detailAddress:arr1[i].split("-")[3],
					                provinceData:[],
			                		cityData:[],
			                		areaData:[]
			                	})
			                }
			                var arr2 = this.checkcommonproject.proAddress.split(",");
			                this.checkcommonproject.address=[];                
			                for(let i=0;i<arr2.length;i++){
			                	this.checkcommonproject.address.push({
			                		provinceValue:arr2[i].split("-")[0],
					                cityValue:arr2[i].split("-")[1],
					                areaValue:arr2[i].split("-")[2],
					                detailAddress:arr2[i].split("-")[3],
					                provinceData:[],
			                		cityData:[],
			                		areaData:[]
			                	})
			                }
                            // 设置用户信息默认值
                            this.checkcommonproject.checkUser = this.userName;
                            this.checkcommonproject.checkOrg = this.orgName + '地震局';
                            // 审定状态
                            this.linkStatus = response.data.data.checkStatus;
                        } else {
                            this.$message.error(response.data.msg);
                        }
                    })
                    .catch(function (error) {
                        console.log(error);
                    });
            },
            resetForm(formName) {
                this.$refs[formName].resetFields();
            },
            // 审定完成确认方法
            checkonSubmit(formName) {
                console.log(this.checkcommonproject.reId);
                this.$refs[formName].validate((valid) => {
                    if (valid) {
		                axios({
		                    method: 'post',
		                    url: '/dzjap/generecord/check',
		                    // data中必须有reId
		                    data: this.checkcommonproject
		                }).then((res) => {
		                    console.log(res);
		                    parent.vm.getData();
		                    if (res.data.code == 200) {
		                        // 提交成功将要执行的代码
		                        this.$message({
		                            message: '审定成功',
		                            type: 'success'
		                        });
		                        this.checkCancel();
		                    }
		                });
		            } else {
                        this.$message({
                            message: 'error!',
                            type: 'error'
                        });
                        return false;
                    }
                });
            },
            // 调用父页面方法关闭弹窗
            checkCancel() {
                parent.vm.generalCancel();
            },
            viewCancel() {
                parent.vm.generalCancel();
            },
            handleChange(file, fileList) {
                this.fileList = fileList.slice(-3);
            }
        }

    })
</script>
</body>
</html>